package org.jeecg.modules.demo.inventorybase.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.inventorybase.entity.InventoryBase;
import org.jeecg.modules.demo.inventorybase.entity.InventoryBaseNotice;
import org.jeecg.modules.demo.inventorybase.mapper.InventoryBaseMapper;
import org.jeecg.modules.demo.inventorybase.service.IInventoryBaseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Description: 库存
 * @Author: jeecg-boot
 * @Date: 2021-12-30
 * @Version: V1.0
 */
@Service
public class InventoryBaseServiceImpl extends ServiceImpl<InventoryBaseMapper, InventoryBase> implements IInventoryBaseService {
    @Resource
    private InventoryBaseMapper inventoryBaseMapper;

    // 查询库存告急商品数量
    @Override
    public String getInventoryUrgentQty(String storeId) {
        return inventoryBaseMapper.getInventoryUrgentQty(storeId);
    }

    @Override
    public IPage<InventoryBase> getRepertoryByShop(Page<Map<String, Object>> page, String name, String code, String storeId) {
        return inventoryBaseMapper.getRepertoryByShop(page, name, code, storeId);
    }

    @Override
    public List<InventoryBaseNotice> getZeroInventoryList() {
        return inventoryBaseMapper.getZeroInventoryList();
    }
}
